//
//  FZQDynamicViewController.m
//  BiliBiliDemo
//
//  Created by IMAC on 16/4/17.
//  Copyright © 2016年 XDH. All rights reserved.
//

#import "FZQDynamicViewController.h"

#import "FZQDynamicCollectionCell.h"

#import "BiliBiliDynamicHeaderView.h"

@implementation FZQDynamicViewController

#pragma mark - init
-(instancetype)init
{
    //设置流水布局
    UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc]init];
    
    //设置尺寸
    
    
    //设置流水布局属性
    
    return [self initWithCollectionViewLayout:flowLayout];
}

#pragma mark - life cycle

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //注册cell
    [self.collectionView registerClass:[FZQDynamicCollectionCell class] forCellWithReuseIdentifier:@"dynamic"];
    
    //设置collectionView
    self.collectionView.backgroundColor = [UIColor whiteColor];
    
    //添加头部视图
    BiliBiliDynamicHeaderView *dynamicHeaderView = [BiliBiliDynamicHeaderView dynamicHeaderView];
    dynamicHeaderView.label.text = @"可以关注这些番哦~";
    [dynamicHeaderView.label sizeToFit];//尺寸自适应
    dynamicHeaderView.center = CGPointMake(SCREEN_WIDTH * 0.5, SCREEN_HEIGHT * 0.1);
    [self.collectionView addSubview:dynamicHeaderView];
}



@end
